﻿namespace TemplateHelper
{
    public class TypeDeclaration
    {
        public TypeDeclaration(string typeName, string propertyName)
        {
            TypeName = typeName;
            PropertyName = propertyName;
        }

        public static TypeDeclaration FromTypeName(string typeName)
        {
            var propertyName = typeName.StartsWith("T")
                ? typeName.Substring(1)
                : "Out";

            return new TypeDeclaration(typeName, propertyName);
        }

        public string TypeName { get; }

        public string PropertyName { get; }

        public string ArgumentName => PropertyName.ToLower();
    }
}